<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\BaseController;
use App\Services\SafeCheckService;
use Illuminate\Http\Request;

class SafeController extends BaseController
{

    public function check(Request $request) {
        $this->validate($request, [
            'type' => 'required',
            'content' => 'required'
        ]);
        $input = $request->input();
        try {
            $arr_hit = SafeCheckService::handle($input);

        } catch (\Exception $e) {
            return $this->failed($e->getMessage());
        }
        return $this->success($arr_hit);
    }



}

